#include "book.h"

book::book()
{

}

//构造函数定义
book::book(string book_name , string author ,double price , bool is_sta)
    : book_name(book_name), author(author) ,price(price) , is_sta(is_sta) {}

//析构函数定义
book::~book() {}

bool book::operator==(book val)
{
    return this->book_name == val.get_book_name();
}

//设置书名
void book::set_book_name(const string &name){
    book_name = name;
}

//获取书名
string book::get_book_name() const{
    return book_name;
}

//设置作者
void book::set_author(const string & author_name){
    author = author_name;
}

//获取作者
string book::get_author() const{
    return author;
}

//设置价格
void book::set_price(double book_price){
    price = book_price;
}

//获取价格
double book::get_price() const{
    return price;
}

//设置状态
void book::set_is_sta(bool status){
    is_sta = status;
}

//获取状态
bool book::get_is_sta() const{
    return is_sta;
}